package com.happy.film.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.happy.film.entity.Film;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wei.zhang
 * @since 2020-03-17
 */
public interface FilmMapper extends BaseMapper<Film> {

    @Select("select a.film_id, a.title, a.thumburl from tb_film_tags b left join  tb_film a on b.film_id  = a.film_id where b.tag_id in (${tagId})  ")
    IPage<Film> selectFilmByTagIds(IPage page, String tagId);
}
